﻿{include file="public/header"}
<title>订单列表</title>
</head>
<style>
    .layui-layer-page .layui-layer-content {
        overflow: visible !important;
    }

</style>
<body>
<nav class="breadcrumb">
    <i class="Hui-iconfont">&#xe67f;</i> 首页
    <span class="c-gray en">&gt;</span> 统计管理
    <span class="c-gray en">&gt;</span>统计列表
    <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px"
       href="javascript:location.replace(location.href);" title="刷新"><i class="Hui-iconfont">&#xe68f;</i></a>
</nav>
<div class="page-container">
    <form method="get">
        <div class="ch-c">
            <span style="line-height: 32px;">月份：</span>
            <input type="text" name="start_time" id="countTimestart" onfocus="selecttime(1)" size="17"
            class="ch-form-assignor" readonly value="<?php echo isset($data['start_time'])?$data['start_time']:''?>">
            <select name="yuanyin" class="ch-form-cSelect">
                <option value="" selected>原因</option>
                <option value="对益鸟不满意">对益鸟不满意</option>
                <option value="价格比其他家高">价格比其他家高</option>
                <option value="价格比预期高">价格比预期高</option>
                <option value="客户嫌麻烦">客户嫌麻烦</option>
                <option value="超出业务范围">超出业务范围</option>
                <option value="没有时间">没有时间</option>
                <option value="其它">其它</option>
            </select>
            <button class="btn btn-success" type="submit"><i class="Hui-iconfont">&#xe665;</i> 搜索</button>
        </div>
    </form>
    <div class="mt-20">
        <table class="table table-border table-bordered table-bg table-hover table-sort">
            <thead>
            <tr class="text-c">

                <th width="100">时间</th>
                <th width="100">取消原因</th>
                <th width="100">取消原因订单量</th>
                <th width="80">取消占比</th>
                <th width="80">取消订单量</th>




            </tr>
            </thead>
            <tbody>
            {volist name='list' id='vo'}
            <tr class="text-c">

                <td>{:date('Y-m',$vo.date)}</td>
                <td>{$vo.yuanyin}</td>
                <td>{$vo.doorto}</td>
                <td>{$vo.qux_count}%</td>

                <td>{$vo.count}</td>
            </tr>
            {/volist}
            </tbody>
        </table>
        <div class="pages" style="float: right">{$list->render()}</div>

    </div>
</div>

{include file="public/footer"}
<script type="text/javascript">
    function selecttime(flag) {
        if (flag == 1) {
            var endTime = $("#countTimeend").val();
            if (endTime != "") {
                WdatePicker({dateFmt: 'yyyy-MM', maxDate: endTime})
            } else {
                WdatePicker({dateFmt: 'yyyy-MM'})
            }
        } else {
            var startTime = $("#countTimestart").val();
            if (startTime != "") {
                WdatePicker({dateFmt: 'yyyy-MM', minDate: startTime})
            } else {
                WdatePicker({dateFmt: 'yyyy-MM'})
            }
        }
    }
    /**
     * 详情
     */
    $('.info').click(function () {
        var id = $(this).attr('data-id');
        var src = "{:Url('index/order/info')}";
        var index=layer.open({
            type: 2,
            area: ['100%', '100%'],
            fix: false,
            shade: 0.4,
            title: '订单详情',
            content: src + '?order_id=' + id
        });
        layer.full(index);
    });


</script>
</body>
</html>